import request from '@/utils/request'

/**
 * 列表
 * @returns
 */
export function GetListAPI(query) {
  return request({
    url: '/system/categoryMaterial/list',
    method: 'GET',
    params: query
  })
}

/**
 * 新增
 * @returns
 */
export function AddDataAPI(data) {
  return request({
    url: '/system/categoryMaterial',
    method: 'POST',
    data
  })
}

/**
 * 修改
 * @returns
 */
export function EditDataAPI(data) {
  return request({
    url: '/system/categoryMaterial',
    method: 'PUT',
    data
  })
}

/**
 * 查询单条
 * @returns
 */
export function GetViewAPI(data) {
  return request({
    url: '/system/categoryMaterial/' + data,
    method: 'GET'
  })
}

/**
 * 删除
 * @returns
 */
export function DelDataAPI(data) {
  return request({
    url: '/system/categoryMaterial/remove/' + data,
    method: 'DELETE'
  })
}

//获取编码规则下拉数据
export function listSelAPI(query) {
  return request({
    url: '/system/code/listSel',
    method: 'GET',
    params: query
  })
}
